{% load comment_tags %}
{% load blog_tags %}
{% load User_tags %}
<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <!--Bootstrap-->
    <link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
    <!--blog自适应样式-->
    <link rel="stylesheet" type="text/css" href="/static/css/responsive.css">
    <!--Font Awesome 图标web link-->
    <link rel="stylesheet" href="https://cdn.staticfile.org/font-awesome/4.7.0/css/font-awesome.css">
    <!-- 标题栏logo-->
    <link rel="icon" href="/static/images/logo.ico" type="image/x-icon">
    <!-- 收藏夹logo-->
    <link rel="shortcut icon" href="/static/images/logo.ico" type="image/x-icon">
    {% block csslink %}要替换的css link{%endblock%}
    <meta charset="utf-8" name="viewport" content="width=device-width, initial-scale=1">
    <title>{% block title %} 原标题 {% endblock %}</title>
    <style type="text/css">
    /*———————————————————————————————首设置——————————————————————————————————*/
    body {
        background: #f5f5f5;
    }

    a {
        text-decoration: none;
    }

    a:hover,
    a:focus {
        outline: none;
        text-decoration: none;
    }

    /*———————————————————————————————导航栏——————————————————————————————————*/
    #mu-header {
        display: inline;
        float: left;
        width: 100%;
        position: absolute;
        left: 0;
        right: 0;
        top: 0;
        padding: 25px 0;
        z-index: 999;
        transition: all 0.5s;

    }

    #mu-header ul {
        padding: 0;

    }

    #mu-header ul li {
        list-style: disc;
        font-size: 17px;
        line-height: 1.59;

    }

    .mu-navbar {
        background-color: transparent;
        border: none;
        border-radius: 0;
        margin-bottom: 0;
    }

    .navbar-default .navbar-brand,
    .navbar-default .navbar-brand:hover,
    .navbar-default .navbar-brand:focus {
        color: #fff;
        font-size: 35px;
        font-family: "微软雅黑", "Microsoft YaHei", "\5FAE\8F6F\96C5\9ED1";
        /*微软雅黑电脑默认装有,英文与Unicode编码提高兼容性*/
        margin-top: 0;
        width: 120px;
        line-height: 18px;
    }

    .navbar-brand img {
        margin-top: -7px;
    }

    #mu-header.mu-fixed-nav {
        width: 100%;
        position: fixed;
        padding: 10px 0;
        background-color: #0097ab;
    }

    /*———————————————————————————————导航栏背景——————————————————————————————————*/
    .banner {
        top: 0px;
    }

    #mu-featured-slider {
        background-color: #0097ab;
        background-attachment: fixed;
        width: 100%;
    }

    .header-banner {
        height: 100px;
    }

    /*———————————————————————————————导航栏隐藏按钮——————————————————————————————————*/
    .mu-menu {
        margin-top: 4px;
        padding: 0, 10px;
    }

    .navbar-default .mu-menu li a {
        color: #fff;
        font-size: 15px;
        font-weight: 400;
        padding: 0;
        margin: 10px 15px;
        transition: all 0.5s;
        position: relative;
    }

    .navbar-default .mu-menu li a::after {
        background-color: #fff;
        content: '';
        height: 2px;
        width: 100%;
        position: absolute;
        bottom: -5px;
        left: 0;
        transform: scale(0);
        transition: all 0.5s;
    }

    .navbar-default .mu-menu li a:hover,
    .navbar-default .mu-menu li a:focus,
    .navbar-default .navbar-nav>.active>a,
    .navbar-default .navbar-nav>.active>a:focus,
    .navbar-default .navbar-nav>.active>a:hover {
        background-color: transparent;
        color: #fff;
    }

    .navbar-default .mu-menu li a:hover::after,
    .navbar-default .mu-menu li a:focus::after,
    .navbar-default .navbar-nav>.active>a:focus::after,
    .navbar-default .navbar-nav>.active>a:hover::after {
        transform: scale(1);
    }

    /*——————————————————————————————侧边栏——————————————————————————————————*/
    #section .sider {
        position: absolute;
        right: 0;
        top: 0;
        width: 350px;
    }

    .sider h4 {
        font-size: 20px;
        margin-top: 0;
        display: inline;
        font-family: 'Poppins', sans-serif;
    }

    .sider hr {
        margin: 10px 0;
    }

    .sider .sider-tag {
        color: #999;
    }

    .about-me .me-contnet {
        color: #fff;
        margin: 0 5px;
    }

    .me-contnet a {
        color: #0abad1;
    }

    .me-contnet a:hover {
        color: #0097ab;
    }

    .tag-content .search {
        padding: 2px 10px 0 10px;
        margin: 6px 0 10px 0;
    }

    .tag-content .search-tag {
        padding: 0 7px 0 7px;
        font-size: 0;

    }

    .tag-content .tag-icon {
        display: inline-block;
        margin: 3px 3px;
        padding: 5px 5px 7px 5px;
        background-color: #0abad1;
        font-size: 12px;
    }

    .tag-content .label:hover {
        background-color: #0097ab;
    }

    .friendly-link .link-icon {
        color: #999;
        font-size: 8px;
    }

    .friendly-link a {
        color: #999;
        font-size: 14px;
    }

    .friendly-link a:hover {
        color: #0097ab;
    }

    .about-me {
        margin-bottom: 10px;
        padding: 20px 20px;
        width: 100%;
        background: #fff;
    }

    .about-me h4 {
        font-family: "微软雅黑", "Microsoft YaHei", "\5FAE\8F6F\96C5\9ED1";
    }

    .tag-content {

        margin-bottom: 10px;
        padding: 20px 20px;
        width: 100%;
        background: #fff;
    }

    .friendly-link {
        margin-bottom: 10px;
        padding: 20px 20px;
        width: 100%;
        background: #fff;
    }

    /* ========= Wechat =========*/
    .sider .Wechat {
        position: relative;
    }

    .Wechat img {
        position: absolute;
        left: -57px;
        top: 20px;
        width: 250%;
        border: 10px;
        z-index: 10;
        display: none;
    }

    .Wechat:hover img {
        display: block;
    }

    /*———————————————————————————————左侧文章——————————————————————————————————*/
    #section {
        padding: 0;
        margin-top: 0px;
    }

    .section-content {
        margin-top: 10px;
        position: relative;
    }

    .arcicle-content {
        max-width: 825px;
        margin-right: 370px;
    }

    /*———————————————————————————————footer——————————————————————————————————*/
    .footerbg {
        color: #999;
        width: 100%;
        background: #f0f0f0;
        left: 0;
        right: 0;
        bottom: 0;
        text-align: center;
        font-size: 13px;
            padding: 16px 0;

    }

    .fixed {
        position: fixed;
    }

    .footerbg a {
        color: #737373;
    }


    /*———————————————————————————————回到顶部——————————————————————————————————*/
    .fixedTools {
        position: fixed;
        bottom: 50px;
        right: 50px;
        width: 35px;
        height: 35px;
        border: 1px solid #e8e8e8;
        /* margin: 0 auto; */
        background-color: #fff;
        font-size: 24px;
        /* line-height: 35px; */
        padding: 0px 5px;
    }


    .fixedTools {
        color: #009299;
    }

    .fixedTools:hover {
        background-color: #009299;
    }

    .fixedTools:hover a {
        color: #fff;
    }
    </style>
    {%block css%}
    {% endblock %}
</head>

<body>
    <!--Start Header-->
    <header id="mu-header" class="" role="banner">
        <div class="container">
            <nav class="navbar navbar-default mu-navbar">
                <div class="container-fluid">
                    <!-- Brand and toggle get grouped for better mobile display -->
                    <div class="navbar-header">
                        <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
                            <span class="sr-only">Toggle navigation</span>
                            <span class="icon-bar"></span>
                            <span class="icon-bar"></span>
                            <span class="icon-bar"></span>
                        </button>
                        <!-- Text Logo -->
                        <a class="navbar-brand" href="/">EOSONES</a>
                        <!-- Image Logo -->
                        <!-- <a class="navbar-brand" href="#"><img src="assets/images/logo.png"></a> -->
                    </div>
                    <!-- Collect the nav links, forms, and other content for toggling -->
                    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                        <ul class="nav navbar-nav mu-menu navbar-right">
                            <li><a href="/homepage/">主页</a></li>
                            <li><a href="/category/technique/">技术</a></li>
                            <li><a href="/category/life/">生活</a></li>
                            <li><a href="/category/project/">合作</a></li>
                            <li><a href="/category/sponsor/">赞助</a>
                            <li>
                                <!--Django模板语音用is_authenticated判断是否登录 -->
                                {% if user.is_authenticated %}
                                <a href="/accounts/login/" title="{{ user.username }}">
                                    <span class="glyphicon glyphicon-user" aria-hidden=" true"></span>
                                </a>
                                {% endif %}
                                {% if not user.is_authenticated %}
                                <a href="/accounts/login/" title="登录">
                                    <span class="glyphicon glyphicon-log-in  aria-hidden=" true"></span>
                                </a>
                                {% endif %}
                            <li>
                        </ul>
                    </div><!-- /.navbar-collapse -->
                </div><!-- /.container-fluid -->
            </nav>
        </div>
    </header>
    <!--End Header -->
    <!--Start banner -->
    <banner class='banner'>
        <div id="mu-featured-slider">
            <div class="header-banner">
            </div>
        </div>
    </banner>
    <!--End banner-->
    <section class="container" id="section">
        <div class="section-content">
            <!--Start 左侧文章--->
            <div class="row">
                <div class=".col-md-12">
                    <div class="arcicle-content">
                        {% block content %}
                        要替换的左侧文章
                        {% endblock %}
                    </div>
                </div>
            </div>
            <!--End 左侧文章--->
            <!--Start 右侧内容--->
            <aside class="sider">
                <div class="about-me">
                    <div class="text-center">
                        <h4>ABOUT ME</h4>
                        <hr>
                    </div>
                    <div class="text-center">
                        <span class="me-contnet">
                            <a target="_blank" href="https://github.com/CRIME-Z?tab=overview&from=2018-08-01&to=2018-08-31#contribution-joined-github-42827340-2018-08-30">
                                <span class="me-icon glyphicon glyphicon-user" aria-hidden="true"></span>
                                Github
                            </a>
                        </span>
                        <span class="me-contnet Wechat">
                            <a href="#">
                                <span class="me-icon sider-but glyphicon glyphicon-qrcode" aria-hidden="true"></span>
                                Wechat
                            </a>
                            <img src="/static/images/wechat.png" />
                        </span>
                        <span class="me-contnet">
                            <a target="_blank" href="http://mail.qq.com/cgi-bin/qm_share?t=qm_mailme&email=Dzw4Ozo7PT4-Pk9_fiFsYGI" style="text-decoration:none;">
                                <span class="me-icon sider-but glyphicon glyphicon-envelope" aria-hidden="true"></span>
                                Mail
                            </a>
                        </span>
                    </div>
                </div>
                <div class="tag-content" id="tag">
                    <h4>标签云</h4>
                    <span class="sider-tag glyphicon glyphicon-tags" aria-hidden="true"></span>
                    <hr>
                    <div class="search">
                        <div class="input-group">
                            <span class="input-group-addon" id="sizing-addon2">
                                <span class="glyphicon glyphicon-search" aria-hidden="true">
                                </span>
                            </span>
                            <input type="text" class="form-control" placeholder="Search for tag" aria-describedby="sizing-addon2" onkeyup="showHint(this.value)">
                        </div>
                    </div>
                    <div class=" search-tag">
                        <!--django自定义模板--->
                        {% get_tags as TagList %}
                        {% for tag in TagList %}
                        <a href="/tags/{{tag.slug}}/" class="tag-icon label label-default">#{{tag.name}}</a>
                        {% endfor %}
                    </div>
                </div>
                <div class="friendly-link">
                    <h4>友情链接</h4>
                    <hr>
                    <!--django自定义模板--->
                    {% get_friendLinks as FriendLinkList %}
                    {% for FriendLink in FriendLinkList %}
                    <div>
                        <span class="link-icon glyphicon glyphicon-link" aria-hidden="true"></span>
                        <a href="{{FriendLink.link}}" target="_blank" href="">{{FriendLink.name}}</a>
                    </div>
                    {% endfor %}
                </div>
                <div class="friendly-link">
                    <h4>推广</h4>
                    <hr>
                    <div>
                        <span class="link-icon glyphicon glyphicon-usd" aria-hidden="true"></span>
                        <a href="#" target="_blank" href="">广告位诚邀加盟</a>
                    </div>
                </div>
            </aside>
            <!--End 右侧内容--->
        </div>
    </section>
    <!--footer-->
    <footer class="footerbg">
        基于Django构建 © 2019
        |
        eosones&#8197;版权所有
        |
        <a href="http://www.miitbeian.gov.cn">粤ICP备19057936号</a>
        |
        托管于<a href="https://cloud.tencent.com/" title="tencent" target="_blank">&#8197;腾讯云主机</a>
        |
        <a href="/sitemap.xml" title="Sitemap" target="_blank">网站地图</a>
        |
        当前在线
        {% get_online_count %}
    </footer>
    <!--返回顶部--->
    <div class="fixedTools hidden">
        <a id='backtop' class="fa fa-arrow-up"></a>
    </div>
    <script src="https://cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></script>
    <script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
    {% block js %} {% endblock %}
    <script type="text/javascript">
    (function($) {
        
    /*———————————————————————————————底部信息栏(需完善)——————————————————————————————————*/
    var viewH = $(window).height(); //浏览器高度 
    var viewW = $(window).width(); //浏览器宽度 
    var scroH = $(document).scrollTop(); //滚动高度
    var contentH = $(document).height(); //内容高度
    var _bh = $(document.body).height(); //内容body高度

    if (contentH > viewH) {//初始判断
        $('.footerbg').removeClass('fixed');
    } else if (contentH = viewH) {
        $('.footerbg').addClass('fixed');
    }
    if (viewW < 767) {//移动页面
        $('.footerbg').addClass('hidden');
    }
    jQuery(window).resize(function() {//实时
        var viewH = $(window).height(); //浏览器高度 
        var contentH = $(document).height(); //内容高度
        if (contentH > viewH) {
            $('.footerbg').removeClass('fixed');
        } else if (contentH = viewH) {
            $('.footerbg').addClass('fixed');
        }

    });
        /*———————————————————————————————浏览器scroll滚动事件——————————————————————————————————*/
        $('.fixedTools').on('click', function() {
            $('body,html').animate({ scrollTop: 0 }, 300);
        });
        jQuery(window).bind('scroll', function() {
            /*出现导航栏与回到顶部*/
            if ($(window).scrollTop() > 200) {
                $('#mu-header').addClass('mu-fixed-nav');
                $('.fixedTools').removeClass('hidden');
            } else {
                $('#mu-header').removeClass('mu-fixed-nav');
                $('.fixedTools').addClass('hidden');
            }
        });

    })(jQuery);
    /*———————————————————————————————ajax左侧标签查询——————————————————————————————————*/
    function showHint(str) {
        var xmlhttp;
        // 1、创建 XMLHttpRequest 对象
        if (window.XMLHttpRequest) {
            // IE7+, Firefox, Chrome, Opera, Safari 浏览器执行代码
            xmlhttp = new XMLHttpRequest();
        } else {
            // IE6, IE5 浏览器执行代码
            xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
        }
        // 3、当服务器响应就绪时执行函数
        xmlhttp.onreadystatechange = function() {
            if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
                STKeywordDict = JSON.parse(xmlhttp.responseText);
                var html = '';
                for (var item in STKeywordDict) {
                    html = html + '<a class="tag-icon label label-default">#' + STKeywordDict[item] + '</a>'
                }
                $('.search-tag').html(html);
            }
        }
        //2、把请求发送到服务器上的文件
        xmlhttp.open("POST", "/ajax/tag/", true);
        xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
        xmlhttp.send('STKeyword=' + str);
    }
    </script>
</body>

</html>